<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{=T.accepted_language or "en"}}">{{# class="no-js" needed for modernizr }}
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
{{# Always force latest IE rendering engine (even in intranet) & Chrome Frame }}
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>
{{try:}}
 {{title #Test Title}}
 {{=settings.get_system_name_short()}}
 : 
 {{=title}}
{{except:}}
 {{=settings.get_system_name()}}
{{pass}}
</title>
{{if response.refresh:}}{{=XML(response.refresh)}}{{pass}}
{{# http://dev.w3.org/html5/markup/meta.name.html }}
<meta name="application-name" content="{{=appname}}" />
{{# Set your site up with Google: http://google.com/webmasters }}
{{# <meta name="google-site-verification" content="" /> }}
{{a="""<!--  Mobile Viewport Fix
 j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
 device-width: Occupy full width of the screen in its current orientation
 initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
 maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width
--> """}}
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" />
<![endif]-->
{{# Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references }}
<link rel="shortcut icon" href="/{{=appname}}/static/favicon.ico" type="image/x-icon" />
{{# <link rel="apple-touch-icon" href="/=appname/static/favicon.png" /> }}
{{# All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects }}{{# This kills the map in IE8: VML.js }}
{{#<script src="/=appname/static/scripts/modernizr.min.js"></script>}}
<style type="text/css">
{{if s3.rtl:}}
 div{direction:rtl;}
{{else:}}
 body{direction:ltr;}
{{pass}}
</style>
{{for sheet in s3.external_stylesheets:}}
 <link href="{{=sheet}}" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
{{pass}}
{{for sheet in s3.stylesheets:}}
 <link href="/{{=appname}}/static/styles/{{=sheet}}" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
{{pass}}
{{include "bootstrap_css.html"}}
{{if s3.debug:}}
 {{=s3base.s3_include_debug_css()}}
{{else:}}
 {{# Built by /static/scripts/tools/build.sahana.py }}
 <link href="/{{=appname}}/static/themes/{{=response.s3.theme}}/eden.min.css" rel="stylesheet" type="text/css" />
{{pass}}
{{include "scripts_top.html"}}
</head>
{{try:}}
 {{if r.representation == "popup":}}{{representation = "popup"}}
 {{elif r.representation == "iframe":}}{{representation = "iframe"}}
 {{else:}}{{representation = ""}}{{pass}}
{{except:}}{{representation = ""}}{{pass}}
{{if representation == "popup":}}
 <body class='popup'>
 {{if response.flash or response.confirmation:}}{{include "layout_popup.html"}}
 {{else:}}{{include}}{{pass}}
 {{if s3.debug:}}{{s3.scripts.append(URL(c="static", f="scripts", args=["S3", "s3.popup.js"]))}}
 {{else:}}{{s3.scripts.append(URL(c="static", f="scripts", args=["S3", "s3.popup.min.js"]))}}{{pass}}
{{elif representation == "iframe":}}
 {{include "layout_iframe.html"}}
 {{include}}
{{else:}}
<body data-spy='scroll' data-target='.bs-docs-sidebar'>
<div class='navbar navbar-fixed-top'>
 <div class='navbar-inner'>
  <div class='container'>
   <button type='button' class='btn btn-navbar' data-toggle='collapse' data-target='.nav-collapse'>
    <span class='icon-bar'></span>
    <span class='icon-bar'></span>
    <span class='icon-bar'></span>
   </button>
   <a class='brand' href='/{{=appname}}/default/index'><img src="/{{=appname}}/static/themes/{{=response.s3.theme}}/img/logo.png" style="width:55px;margin:0 0 -50px 0" alt=""/><h1 id="main-title">{{=settings.get_system_name_short()}}</h1></a>
   <div class='nav-collapse collapse'>
    <ul class='nav'>
     <li><a href='/{{=appname}}/default/index/newsfeed'> <i class='icon-updates'></i> {{=T("News Feed")}}</a></li>
     <li><a href='/{{=appname}}/gis/index'><i class='icon-map'></i> {{=T("Map")}}</a></li>
     <li><a href='/{{=appname}}/project/project'><i class='icon-project'></i> {{=T("Projects")}}</a></li>
     <li class='dropdown'> <a href='#' class='dropdown-toggle disabled top-level' id='profiles' data-toggle='dropdown'><i class='icon-folder-open-alt'></i> {{=T("Profiles")}}<b class='caret'></b></a>
      <ul class='dropdown-menu' role='menu' aria-labelledby='profiles'>
       <li role='menuitem'><a href='/{{=appname}}/event/event/datalist' tabindex='-1' class='menu-item'><i class='icon-incident'></i> {{=T("Disasters")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/gis/location/datalist' tabindex='-1' class='menu-item'><i class='icon-map'></i> {{=T("Districts")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/org/organisation/datalist' tabindex='-1' class='menu-item'><i class='icon-sitemap'></i> {{=T("Stakeholders")}}</a></li>
      </ul>
     </li>
     <li class='dropdown'> <a href='#' class='dropdown-toggle disabled top-level' id='more' data-toggle='dropdown'><i class='icon-plus-sign'></i> {{=T("More")}}<b class='caret'></b></a>
      <ul class='dropdown-menu' role='menu' aria-labelledby='more'>
       <li role='menuitem'><a href='/{{=appname}}/org/resource' tabindex='-1' class='menu-item'><i class='icon-resource'></i> {{=T("Resource Inventory")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/pr/person' tabindex='-1' class='menu-item'><i class='icon-contact'></i> {{=T("Contact Directory")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/doc/document' tabindex='-1' class='menu-item'><i class='icon-file-alt'></i> {{=T("Documents")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/default/index/glossary' tabindex='-1' class='menu-item'><i class='icon-list'></i> {{=T("Glossary")}}</a></li>
       <li role='menuitem'><a href='/{{=appname}}/default/index/links' tabindex='-1' class='menu-item'><i class='icon-external-link'></i> {{=T("Links")}}</a></li>
      </ul>
     </li>
    </ul>
    <div class='pull-right'>
     <ul class='nav pull-right'>
      <li class='dropdown'><a href='#' class='dropdown-toggle disabled' data-toggle='dropdown'><i class='icon-cog'></i><b class='caret'></b></a>
       <ul class='dropdown-menu'>{{vars=request.vars}}
       {{if response.s3.language == "en":}}{{tet_vars=dict(_language="tet")}}{{for var in vars:}}{{tet_vars[var]=vars[var]}}{{pass}}
        <li><a href='{{=URL(args=request.args, vars=tet_vars)}}'><i class='icon-comment-alt'></i> Tetum</a></li>
       {{else:}}{{en_vars=dict(_language="en")}}{{for var in vars:}}{{en_vars[var]=vars[var]}}{{pass}}
        <li><a href='{{=URL(args=request.args, vars=en_vars)}}'><i class='icon-comment-alt'></i> English</a></li>{{pass}}
        <li class='divider'></li>
       {{if auth.is_logged_in():}}
        <li><a href='/{{=appname}}/default/user/profile'><i class='icon-user'></i> {{=T("Profile")}}</a></li>
        <li><a href='/{{=appname}}/default/index/subscriptions'><i class='icon-envelope'></i> {{=T("Notifications")}}</a></li>
        <li><a href='/{{=appname}}/default/user/change_password'><i class='icon-lock'></i> {{=T("Change Password")}}</a></li>
        {{if auth.s3_has_role("ADMIN"):}}
        <li><a href='/{{=appname}}/admin/user'><i class='icon-cogs'></i> {{=T("Admin")}}</a></li>
        {{pass}}
        <li class='divider'></li>
        <li><a href='/{{=appname}}/default/user/logout'><i class='icon-off'></i> {{=T("Logout")}}</a></li>
       {{else:}}
        <li><a href='/{{=appname}}/default/user/login'><i class='icon-signin'></i> {{=T("Login")}}</a></li>
       {{pass}}
       </ul>
      </li>
     </ul>
    </div>
   </div>
  </div>
 </div>
</div>
<div class='container main-container'>
 <div id='alert-space'>
  {{if response.error:}}<div class='alert alert-error'><button type='button' class='close' data-dismiss='alert'>×</button>{{=response.error}}</div>{{pass}}
  {{if response.warning:}}<div class='alert'><button type='button' class='close' data-dismiss='alert'>×</button>{{=response.warning}}</div>{{pass}}
  {{if response.information:}}<div class='alert alert-info'><button type='button' class='close' data-dismiss='alert'>×</button>{{=response.information}}</div>{{pass}}
  {{if response.confirmation:}}<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>×</button>{{=response.confirmation}}</div>{{pass}}
  {{if response.flash:}}<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>×</button>{{=response.flash}}</div>{{pass}}
 </div>
 {{include}}
</div>
 <div id='footer'>
  {{include "../private/templates/%s/views/footer.html" % response.s3.theme}}
  {{if s3.debug:}}{{=s3.toolbar()}}{{pass}}
 </div>
{{pass}}
{{include "bootstrap_js.html"}}
{{include "scripts.html"}}
</body>
</html>